<?php
function smarty_function_dropdown($params, $smarty) {
    $template = "dropdown.tpl";
    $inputparams = "";
    $title = "";
    $hint = "";
    $validate = "";
    $id = "";
    $validationParams = "null";
    foreach ($params as $key=>$value) {
        if ($key == "title") { $title = $value; }
        else if ($key == "hint") { $hint = $value; }
        else if ($key == "validate") { $validation = $value; }
        else if ($key == "id") { $id = $value; }
        else if ($key == "validationparam") { $validationParams = $value; }
        else {
            $inputparams .= "$key='$value' ";
        }
    }
    $smarty->assign("id", $id);
    $smarty->assign("validationparams", $validationParams);
    $smarty->assign("validate", $validation);
    $smarty->assign("params", $inputparams);
    $smarty->assign("hint", $hint);
    $smarty->assign("title", $title);
    return $smarty->fetch("plugins/$template");
}

?>
